I agree, 100%. You cant use a button meant to stop the machine to also restart the machine. Thats just asking for trouble. I didnt bother with this sample code at all and was using something similar to yours at first.
The last bit of code i posted is a little confusing, but basically it just uses the feedhold button to set a variable, and then you check for this variable and whatever other conditions you want, and then actually issue the stopcoordinatedmotion command.
In my case i checked for my feedhold variable, waited until any axis was instructed to move, my toolchanger was finished, and a job is active, all the same time. This way it remembers if feedhold is pushed while toolchanging for example, and it applies feedhold as soon as toolchange is done and machine is instructed to move. Seems to be working well so far.
mark